import React from 'react';
import TabBar from '../components/tabbar/tabBar'
import InputCompenent from '../components/input/input'
class myPage extends React.Component {
  constructor(props) {
    super(props);
    this.state = {newText: 'default'};
  }
  changeText(event) {
    this.setState({
      newText: event.target.value,
    })
  }

  render() {
    return (
      <div>
        {/* 子组件 */}
        <TabBar 
          page="mypage" 
        >
        </TabBar>
        <div className="pd-md">
          <h3>我是一个mypage</h3>
          <div>
            {this.state.newText}
            <InputCompenent onChangeText={this.changeText.bind(this)} text={this.state.newText}></InputCompenent>
          </div>
        </div>
        
      </div>
    );
  }
}

export default myPage;